:root {
  --el-color-primary: #3370ff;
  --el-color-success: #34c724;
  --el-text-color-primary: #1f2329;
  --el-border-radius-base: 6px;
  --el-menu-item-height: 45px;
  --el-border-color: rgba(31, 35, 41, 0.15);
}

.el-avatar {
  --el-avatar-bg-color: var(--el-color-primary);
  --el-avatar-size-small: 33px;
  --el-avatar-border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.el-icon {
  flex-shrink: 0;
}

// card
.el-card {
  --el-card-padding: calc(var(--app-base-px) * 2);
  --el-card-border-radius: 6px;
  box-shadow: 0px 2px 4px 0px rgba(31, 35, 41, 0.12) !important;
  &.is-never-shadow {
    border: 1px solid var(--el-card-border-color);
    box-shadow: none !important;
  }
  .el-card__body {
    overflow: inherit;
  }
}

// tree
.el-tree {
  background: none;
}
.el-tree-node__content {
  border-radius: var(--el-border-radius-base);
  padding: 7px 0;
  &:hover {
    background: var(--app-text-color-light-1);
  }
}
.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
  background: var(--el-color-primary-light-9);
  color: var(--el-color-primary);
}
.el-tree-node__expand-icon {
  color: var(--app-text-color-secondary);
  font-size: 16px;
}

// button
.el-button {
  --el-button-font-weight: 400;
  --el-button-text-color: var(--el-text-color-primary);
  padding: 5px 12px;
  // color: var(--el-text-color-primary);
  &.is-text {
    padding: 4px !important;
    font-size: 16px;
    max-height: 24px;
    &:not(.is-disabled):hover {
      background: var(--app-text-color-light-1);
    }
  }
  &:focus {
    background-color: none;
    border-color: none;
  }
  &:focus-visible {
    outline: none !important;
  }
  &.is-link:focus {
    background: none;
    border: none;
  }
}
.el-button--text {
  border: none !important;
  &:focus {
    border: none !important;
  }
}
.el-button--large {
  font-size: 16px;
}
.el-button--primary {
  --el-button-text-color: var(--el-color-white);
}
// dropdown
.el-dropdown {
  color: var(--el-text-color-primary);
}
.el-dropdown-menu__item {
  color: var(--el-text-color-primary);
  font-weight: 400;
  padding: 5px 11px;
  min-width: 80px;
  i {
    margin-right: 8px;
  }
  &:not(.is-disabled):focus,
  &:not(.is-active):focus {
    background-color: var(--app-text-color-light-1);
    color: var(--el-text-color-primary);
  }
  &.is-active,
  &.is-active:hover {
    color: var(--el-menu-active-color);
    background: var(--el-color-primary-light-9);
  }
  &.active {
    color: var(--el-color-primary);
  }
}

// message
.el-message {
  --el-message-close-icon-color: var(--app-text-color-secondary);
}
.el-message__content {
  word-break: break-all;
}
.el-message-box {
  --el-messagebox-font-size: 16px;
  --el-messagebox-width: 475px;
  padding: 24px;
  .el-message-box__header {
    padding: 0;
  }
  .el-message-box__title {
    word-break: break-all;
    width: 95%;
  }
}

.el-message-box__content {
  padding: 24px 0;
  color: var(--app-text-color);
  font-weight: 400;
}
.el-message-box__btns {
  padding: 0;
  button {
    min-width: 80px;
    &:nth-child(2) {
      margin-left: 12px;
    }
  }
  button.danger {
    background: var(--el-color-danger);
    border: var(--el-color-danger);
    color: #ffffff;
  }
}
.el-message-box__headerbtn {
  right: 10px;
  top: 16px;
  .el-message-box__close {
    font-size: 20px;
  }
}

// drawer
.el-drawer {
  .el-drawer__header {
    padding: 16px 24px;
    margin: 0;
    border-bottom: 1px solid var(--el-border-color);
    color: var(--app-text-color);
  }
  .el-drawer__body {
    padding: 16px 24px;
  }
  .el-drawer__footer {
    border-top: 1px solid var(--el-border-color);
    padding: 16px 24px;
  }
}

// popper
.el-popper {
  --el-popper-border-radius: 6px;
}

// table
.el-table {
  --el-table-header-bg-color: var(--app-layout-bg-color);
  --el-table-text-color: var(--app-text-color);
  --el-table-border-color: #dee0e3;
  font-weight: 400;
  thead {
    color: var(--app-text-color-secondary);
    th {
      font-weight: 500;
    }
  }

  th.el-table__cell {
    border-top: var(--el-table-border);
  }
  .el-table__cell {
    padding: 12px 0;
  }
  .el-checkbox {
    height: 23px;
  }
  tr.highlight {
    background: var(--el-table-current-row-bg-color);
  }
}

// dialog
.el-dialog {
  --el-dialog-padding-primary: 24px;
  --el-dialog-border-radius: 8px;
  --el-dialog-title-font-size: 16px;
  .el-dialog__body {
    color: var(--el-text-color-primary);
  }
}
.el-dialog__headerbtn {
  top: 12px;
  right: 8px;
  .el-dialog__close {
    font-size: 20px;
  }
}

@media only screen and (max-width: 768px) {
  .el-dialog {
    width: 90% !important;
  }
}

// el-form

.el-form {
  --el-form-inline-content-width: 100%;
}

.el-form-item {
  margin-bottom: 16px;
  .el-form-item {
    margin-bottom: 16px;
    &:last-child {
      margin-bottom: 0px;
    }
  }
}
.el-form-item__label {
  font-weight: 400;
  width: 100% !important;
  color: var(--el-text-color-primary);
}

.el-form-item__content {
  font-weight: 400 !important;
  color: var(--el-text-color-primary);
}

.el-form-item__error {
  position: unset;
  font-size: 14px;
}

.el-form--label-top .el-form-item .el-form-item__label {
  padding-right: 0;
}

.el-divider__text {
  background: var(--app-layout-bg-color);
}

// el-cascader
.el-cascader-node {
  padding-left: 2px;
}
.el-cascader-node__prefix {
  right: 10px;
  left: auto;
}

.el-anchor {
  --el-anchor-font-size: 14px;
}

.el-breadcrumb__separator.el-icon {
  font-size: 12px;
}

// el-tag
.el-tag {
  padding: 0 4px;
  height: 20px;
  font-weight: 400;
}
.el-tag--plain.el-tag--info {
  color: var(--app-text-color-secondary);
  font-weight: 500;
  border-color: var(--app-text-color-light-1);
}

// el-select
.el-select__selected-item {
  color: var(--el-text-color-primary);
  font-weight: 400;
  .el-tag {
    color: var(--el-text-color-primary);
    background-color: var(--app-text-color-light-1);
    height: 24px;
    font-size: 14px;
    font-weight: 400;
  }
}
.el-select__caret {
  color: var(--app-text-color-secondary);
}
.el-select__wrapper.is-disabled .el-select__caret {
  color: var(--app-text-color-disable);
}

// el-textarea
.el-textarea {
  --el-input-text-color: var(--el-text-color-primary);
}

// el-input
.el-input {
  --el-input-text-color: var(--el-text-color-primary);
}
.el-input .el-input__password {
  color: var(--app-text-color-secondary) !important;
}

.el-input-group__prepend div.el-select .el-select__wrapper {
  background: #ffffff;
  &:hover {
    background: #ffffff;
  }
  .el-select__placeholder {
    color: var(--el-text-color-regular);
  }
}

// el-pagination
.el-pagination .el-select {
  width: 105px;
}
.el-pagination__total {
  color: var(--el-text-color-primary);
}

// el-checkbox
.el-checkbox {
  --el-checkbox-font-weight: 400;
  --el-checkbox-text-color: var(--el-text-color-primary);
}
.el-checkbox__input.is-checked + .el-checkbox__label {
  color: var(--el-text-color-primary);
}

// el-radio
.el-radio {
  --el-radio-font-weight: 400;
  color: var(--el-text-color-primary);
}
.el-radio__input.is-checked + .el-radio__label {
  color: var(--el-text-color-primary);
}

// el-tabs
.el-tabs__header {
  margin: 0 0 12px;
}
.el-tabs__item {
  padding: 0 14px;
}

.el-tabs__nav-wrap:after {
  height: 1px;
}
.el-tabs__active-bar {
  height: 3px;
}

// el-upload
.el-upload {
  --el-upload-dragger-padding-horizontal: 32px;
}
